package gameSite;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class SessionHandler {

	//static ArrayList <SessionHandler> sessionList =  new ArrayList<SessionHandler>();
	
	HttpSession handlerSession;
	public static int sessionID = 0;
	
	
	SessionHandler()
	{
		
	}
	
	 SessionHandler(HttpServletRequest request, HttpServletResponse response)
	{
		HttpSession session = request.getSession(true);
		response.setContentType("text/html");
		handlerSession = session;
		//addToSessionList();
		sessionID++;
	}
	
	 
	 
	//public ArrayList<SessionHandler>   	getSessionList()   		 	{ return sessionList; }
	public		   HttpSession    			getSession()     		 	{ return handlerSession; }
	public		   			  int				getSessionID()			 	{ return sessionID; }
	//				   HttpSession  			getHttpSession(int id)	{ return sessionList.get(id).getSession(); }
	//				     		void 				addToSessionList()  	 	{ sessionList.add(this); }
	
}
